package com.brainsitter;




import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;
import android.support.v4.app.NavUtils;

public class MainActivity extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        TabHost tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab

	    // Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this, TaskTabActivity.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec("Task").setContent(intent);
	    spec.setIndicator("Task",getResources().getDrawable(R.drawable.task_white));
	    tabHost.addTab(spec);

	    
	    // Do the same for the other tabs
	    intent = new Intent().setClass(this, NoteTabActivity.class);
	    spec = tabHost.newTabSpec("Notes").setContent(intent);
	    spec.setIndicator("Notes",getResources().getDrawable(R.drawable.note_white));
	    tabHost.addTab(spec);

	    // Do the same for the other tabs
	    intent = new Intent().setClass(this, CredentialTabActivity.class);
	    spec = tabHost.newTabSpec("Credentials").setContent(intent);
	    spec.setIndicator("Profile",getResources().getDrawable(R.drawable.profile_white));
	    tabHost.addTab(spec);
	    

	    // Do the same for the other tabs
	    intent = new Intent().setClass(this, RedeemTabActivity.class);
	    spec = tabHost.newTabSpec("Redeem").setContent(intent);
	    spec.setIndicator("Redeem",getResources().getDrawable(R.drawable.redeem_white));
	    tabHost.addTab(spec);


	    tabHost.setCurrentTab(4);
	    
    }

    
    
    
    

    
}
